//
//  OrderStateTableViewCell.m
//  ForestPack
//
//  Created by 郑洲 on 2018/7/20.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "OrderStateTableViewCell.h"

@interface OrderStateTableViewCell ()

@property (nonatomic, strong) UILabel *stateLabel;

@end

@implementation OrderStateTableViewCell

+ (OrderStateTableViewCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath andTitle:(NSString *)title
{
    static NSString *cellID = @"OrderStateTableViewCell";
    OrderStateTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[OrderStateTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.backgroundColor = [UIColor whiteColor];
        [cell createSubViewWithTitle:title];
    }
    
    return cell;
}

- (void)createSubViewWithTitle:(NSString *)title
{
    self.stateLabel = [[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(37), ScreenX375(200), ScreenX375(22))];
    self.stateLabel.text = title;
    self.stateLabel.textColor = REXADECIMALCOLOR(@"#333333");
    self.stateLabel.font = Kfont(18);
    [self addSubview:self.stateLabel];
    
    UIImageView *noteImage = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - ScreenX375(130), ScreenX375(15), ScreenX375(123), ScreenX375(65))];
    noteImage.image = ImageWithName(@"订单生成");
    [self addSubview:noteImage];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
